// pages/funcs/fdd.js
const App = getApp()

Page({
  data: {
    init: false,

    url: '',
  },
  onLoad(options) {
    let uri = decodeURIComponent(options.url)

    uri = uri.replace("https://textapi.fadada.com", "https://textapi02.fadada.com")
    uri = uri.replace("https://realnameverify.fadada.com", "https://realnameverify01.fadada.com")

    console.log(uri)

    this.setData({
      init: true,
      url: uri
    })
  },

  /** 刷脸完成后重新加载实名认证页面 */
  // 页面重新加载周期
  reloadPage(uri) {
    console.log('---webview reloadPage', uri)

    uri = uri.replace("https://textapi.fadada.com", "https://textapi02.fadada.com")
    uri = uri.replace("https://realnameverify.fadada.com", "https://realnameverify01.fadada.com")

    this.setData({
      url: uri,
    })
  },
  bindLoad(e) {
    console.log(e)
  },
  bindMessage(e) {
    console.log(e)
  },
  bindError(e) {
    console.log(e)
  },
})